home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
UpTime Volume 1 #8
/
utv1n8s1.d64
/
question maker
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-28
|
5KB
|
149 lines
10 gosub 1500
15 poke 198,0
20 gety$
30 ify$="y"then 60
40 ify$="n"then420
50 goto20
60 print"[147] [209][213][197][211][212][201][207][206] [205][193][203][197][210] is for use with"
70 print"[195][207][205][208][213][212][197][210] [211][209][213][193][210][197][211]. [215]ith it you can make"
80 print"your own questions for use in that game."
100 print" [217]ou can either write new questions"
110 print"or edit existing ones.":poke198,0
120 print"[158] [208]ress [211][208][193][195][197][194][193][210] to continue"
130 gets$:ifs$<>" "then130
140 print"[147] [212]o write new questions, select '[215]'"
150 print"at the main prompt. [217]ou will then be"
160 print"asked to type in: 50 questions, 50"
170 print"right answers, 50 wrong answers and 50"
180 print"funny wrong answers. [212]he last one is"
190 print"optional. [201]f you don't want to put in
200 [153]"anything funny you should just press
210 print"return on a blank line. [193]ll other
220 [153]"questions must be answered."
240 [153]" (NULL)he questions that you make can be"
250 [153]"up to 2 line lengths long. atnnything"
260 [153]"else can only be 1 line length long."
270 [153]"(NULL)hen you are done you are given the"
280 [153]"option to review your entries and then"
290 [153]"you will select a file name to save"
300 [153]"them under.":[151]198,0
310 [153]"sys (NULL)ress (NULL)(NULL)atnlenvalpeekatn(NULL) to continue"
320 [161]s$:[139]s$[179][177]" "[167]320
330 [153]"load (NULL)o edit existing questions, enter"
340 [153]"'val' at the main prompt. (NULL)ou will then
350 print"enter the file name of the questions you";
360 print"want to edit. [197]ach question, answer,
370 [153]"etc., is shown in turn and you are given";
380 [153]"the chance to change it.
400 print" [208][204][197][193][211][197] [206][207][212][197] - [215]hen you get to [198][213][206][206][217]"
401 print"[215][210][207][206][199] [193][206][211][215][197][210][211], if when you wrote the"
402 print"file you left this blank a plus sign"
403 print"(+) will show up here. [212]his is normal"
404 print"just leave it alone unless you want"
405 print"to put something here.":poke198,0
410 print"[158] [208]ress [211][208][193][195][197][194][193][210] to start"
411 gets$:ifs$<>" "then411
420 dima$(200):print"";
430 print"[147]"tab(13)"[209]uestion [205]aker"
440 print" [196]o you want to:":print" [197][155]dit or review a file":qw=0
450 print" [215][155]rite a new file":print" [198]8[155]-[197]xit [209]uestion [205]aker"
460 print" [197]nter [158][197],[158] [215] or [158][198]8 ":poke198,0
470 geta$:ifa$=""then470
480 ifa$="e"thenqw=1:goto1020
490 ifa$="[140]"thensys 8*4096+4
495 if a$<>"w" then 470
500 aa=0
510 fora=1to50
520 print"[147][155][209]uestion "a:print:print
530 b$="":print"[215]hat is the question?":print">";:gosub2000:b$=t$:ifb$=""then530
540 a$(aa)=b$:aa=aa+1:print
550 b$="":print"[158][215]hat is the correct answer?":print">";:gosub2000:b$=t$:ifb$=""then550
560 a$(aa)=b$:aa=aa+1:print
570 b$="":print"[215]hat is a wrong answer?":print">";:gosub2000:b$=t$:ifb$=""then570
580 a$(aa)=b$:aa=aa+1:print
590 b$="":print"[158][215]hat is a wrong, funny answer?":print">";:gosub2000
595 b$=t$:ifb$=""thenb$="+"
600 a$(aa)=b$:aa=aa+1
610 nexta
620 print"[147][215]ould you like to review your questions"
630 printtab(10)"and answers? ([217]/[206])"
640 geta$:ifa$=""then640
650 ifa$="n"andqw=1then430
660 ifa$="n"then930
670 aa=0:fora=1to50
680 print"[147][158][209]uestion "a:print:print
690 print"[209]uestion:":printa$(aa)
700 print:print"[158][201]s this correct? ([217]/[206])"
710 geta$:ifa$=""then710
730 ifa$="n"then gosub910
740 aa=aa+1:print"[195]orrect answer:":printa$(aa)
750 print:print"[158][201]s this correct? ([217]/[206])"
760 geta$:ifa$=""then760
770 ifa$="n"then gosub910
780 aa=aa+1:print"[215]rong answer:":printa$(aa)
790 print:print"[158][201]s this correct? ([217]/[206])"
800 geta$:ifa$=""then800
810 ifa$="n"then gosub910
820 aa=aa+1:print"[198]unny wrong answer:":printa$(aa)
830 print:print"[158][201]s this correct? ([217]/[206])"
840 geta$:ifa$=""then840
850 ifa$="n"then gosub910
855 if a$<>"y" then 840
860 aa=aa+1:next
870 ifqw=1thenprint"[147][196]o you want to resave this file? ([217]/[206])":poke198,0
880 geta$
890 ifa$="y"then930
895 if a$<>"n" then 880
900 goto430
910 print"[158][210]etype the corrected form now.":print">";
920 gosub2000:a$(aa)=t$:print"[147]";:return
930 print"[147][208]lease enter a name for this file":print">";:gosub 2000:b$=t$
940 ifb$=""then930
950 print"[201]nsert a blank formatted disk or a disk"
960 print"with at least 20 free blocks into":print"your drive."
970 print"[158] [208]ress [211][208][193][195][197][194][193][210] when ready":poke198,0
980 geta$:ifa$<>" "then980
985 open 15,8,15,"i0":gosub 2500
987 if er$>"19" then close 15:goto 985
990 open2,8,7,"@0:"+b$+",s,w":gosub 2500
995 if er$>"19" then close 2:close 15:goto 985
1000 forc=0to200:print#2,a$(c):next
1010 close2:close15:goto430
1020 print"[147]":b$=""
1030 print" [201]nsert disk with the file on it that"
1040 print" you want to review or change"
1050 print"[197]nter file name":print">";:gosub2000:ift$=""then1050
1055 open 15,8,15,"i0":gosub 2500
1057 if er$>"19" then close 15:goto 1055
1060 open3,8,3,"0:"+t$:gosub 2500
1065 if er$>"19" then close3:close15:goto 1055
1070 forb=0to199
1080 input#3,a$(b):next
1090 close3:close 15:goto620
1500 poke53280,0:poke53281,6:print"[147]"tab(13)"[209]uestion [205]aker"
1510 printtab(5)"[198]or use with [195]omputer [211]quares"
1520 printtab(9)"(c) 1987 [199]eorge [196]ecker"
1530 print" [208]ublished by [211]oftdisk [208]ublishing, [201]nc."
1540 print" [196]o you need instructions? ([217]/[206])"
1550 return
2000 t$="":print"[164]";
2010 get a$:if a$="" then 2010
2020 a%=asc(a$)
2025 if a%=140 then sys 8*4096+4
2030 if a%=13 then print"[157] ":return
2040 if a%=20 and t$="" then 2010
2050 if a%=20 then t$=left$(t$,len(t$)-1):print"[157][157] [157][157][164]";:goto 2010
2060 if a%=34 then 2010
2070 if a%<32 or a%>218 then 2010
2080 if a%>90 and a%<193 then 2010
2085 if len(t$)=36 then 2010
2090 print"[157] [157]"a$"[164]";
2100 t$=t$+a$
2110 goto 2010
2500 input#15,er$,em$,et$,es$
2510 if er$<"20" then return
2520 print"[147] [196]isk error!: "er$", "em$","et$","es$
2530 printtab(8)"[208]ress [210]eturn to continue"
2540 get a$:if a$<>chr$(13) then 2540
2550 return